package JavaSE.TCPUDPLearning.TCPLearning;

import java.io.IOException;
import java.io.OutputStream;
import java.net.InetAddress;
import java.net.Socket;

public class TCPClient {
    public static void main(String[] args) throws IOException {
        InetAddress stu1 = InetAddress.getByName("韩许发");
        System.out.println(stu1.getHostAddress() + " -- " + stu1.getHostName());
        Socket socket = new Socket("192.168.5.45", 8686);
        OutputStream outputStream = socket.getOutputStream();
        //outputStream.write("Hello".getBytes());
        //InputStream is = socket.getInputStream();
        //byte[] bytes = new byte[1024];
        //int len = is.read(bytes);
        //System.out.println(new String(bytes,0,len));
        //socket.close();
    }
}
